﻿//-----------------------------------------------------------------------
// <copyright>
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//----------------------------------------------------------------------- 
using System.Xml;
using Fulcrum.ControlGenerator;

namespace Fulcrum.UnitTests.ControlGenerator
{
    class ControlXmlConfigurationTestDouble : ControlXmlConfiguration
    {
        public ControlXmlConfigurationTestDouble(XmlReader xmlReader) :
            base(xmlReader)
        {
            // nothing
        }

        protected override IAttachedDependencyPropertyConfiguration CreateAttachedDependencyPropertyConfiguration(XmlReader xmlReader)
        {
            string name = xmlReader["name"];
            var config = MockConfigurationHelp.CreateAttachedDependencyPropertyConfig(name, "int");
            xmlReader.Read();

            return config;
        }

        protected override IRoutedCommandBindingConfiguration CreateCommandBindingConfiguration(XmlReader xmlReader)
        {
            string name = xmlReader["name"];
            var config = MockConfigurationHelp.CreateRoutedCommandBindingConfig(name);
            xmlReader.Read();

            return config;
        }

        protected override IDependencyPropertyConfiguration CreateDependencyPropertyConfiguration(XmlReader xmlReader)
        {
            string name = xmlReader["name"];
            var config = MockConfigurationHelp.CreateDependencyPropertyConfig(name, "int");
            xmlReader.Read();

            return config;
        }

        protected override IRoutedCommandBindingConfiguration CreateRoutedCommandConfiguration(XmlReader xmlReader)
        {
            string name = xmlReader["name"];
            var config = MockConfigurationHelp.CreateRoutedCommandConfig(name);
            xmlReader.Read();

            return config;
        }

        protected override IRoutedEventConfiguration CreateRoutedEventConfiguration(XmlReader xmlReader)
        {
            string name = xmlReader["name"];
            var config = MockConfigurationHelp.CreateRoutedEventConfig(name);
            xmlReader.Read();

            return config;
        }

        protected override ITemplatePartConfiguration CreateTemplatePartConfiguration(XmlReader xmlReader)
        {
            string name = xmlReader["name"];
            var config = MockConfigurationHelp.CreateTemplatePartConfig(name, "int");
            xmlReader.Read();

            return config;
        }
    }
}
